<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>RMS | 首页</title>
		<!-- Tell the browser to be responsive to screen width -->
		<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
		<!-- Bootstrap 3.3.7 -->
		<link rel="stylesheet" href="/static/bower_components/bootstrap/dist/css/bootstrap.min.css">
		<!-- Font Awesome -->
		<link rel="stylesheet" href="/static/bower_components/font-awesome/css/font-awesome.min.css">
		<!-- Ionicons -->
		<link rel="stylesheet" href="/static/bower_components/Ionicons/css/ionicons.min.css">
		<!-- DataTables -->
		<link rel="stylesheet" href="/static/bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css">
		<!-- Theme style -->
		<link rel="stylesheet" href="/static/dist/css/AdminLTE.min.css">
		<!-- AdminLTE Skins. Choose a skin from the css/skins
       folder instead of downloading all of them to reduce the load. -->
		<link rel="stylesheet" href="/static/dist/css/skins/_all-skins.min.css">

		<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
		<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
		<!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->

		<!-- Google Font -->
		<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
		<style type="text/css">
			.content {
				position: relative;
				margin-top: 60px;
				text-align: center;
			}
			
			.content h1 {
				line-height: 100px;
			}
			
			.image {
				width: 40px;
				height: 40px;
			}
			
			.image>img {
				display: inline-block;
				width: 40px;
				height: 40px;
			}
		</style>
	</head>

	<body class="hold-transition skin-blue sidebar-mini" style="overflow:-Scroll;overflow-y:hidden">
		<div class="wrapper">

			<header class="main-header">
				<a href="#" class="logo">
					<!-- mini logo for sidebar mini 50x50 pixels -->
					<span class="logo-mini"><b>RMS</b></span>
					<!-- logo for regular state and mobile devices -->
					<span class="logo-lg"><b>用户权限管理</b>系统</span>
				</a>
				<!-- Header Navbar: style can be found in header.less -->
				<nav class="navbar navbar-static-top">
					<!-- Sidebar toggle button-->
					<a href="javascript:void(0);" class="sidebar-toggle" data-toggle="push-menu" role="button">
						<span class="sr-only">切换导航</span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
					</a>

					<div class="navbar-custom-menu">
						<ul class="nav navbar-nav">
							<!-- Messages: style can be found in dropdown.less-->
							<li class="dropdown messages-menu">
								<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown">
									<i class="fa fa-envelope-o"></i>
									<span class="label label-success">4</span>
								</a>
								<ul class="dropdown-menu">
									<li class="header">你有4条信息</li>
									<li>
										<!-- inner menu: contains the actual data -->
										<ul class="menu">
											<li>
												<!-- start message -->
												<a href="javascript:void(0);">
													<div class="pull-left">
														<img src="/static/dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">
													</div>
													<h4> 支持团队<small><i class="fa fa-clock-o"></i> 5分钟</small></h4>
													<p>为什么不买一个新的可怕的主题?</p>
												</a>
											</li>
											<!-- end message -->
											<li>
												<a href="javascript:void(0);">
													<div class="pull-left">
														<img src="/static/dist/img/user3-128x128.jpg" class="img-circle" alt="User Image">
													</div>
													<h4>adminlte设计团队<small><i class="fa fa-clock-o"></i> 2小时</small></h4>
													<p>为什么不买一个新的可怕的主题？</p>
												</a>
											</li>
											<li>
												<a href="javascript:void(0);">
													<div class="pull-left">
														<img src="/static/dist/img/user4-128x128.jpg" class="img-circle" alt="User Image">
													</div>
													<h4>开发商<small><i class="fa fa-clock-o"></i> Today</small></h4>
													<p>为什么不买一个新的可怕的主题？</p>
												</a>
											</li>
											<li>
												<a href="javascript:void(0);">
													<div class="pull-left">
														<img src="/static/dist/img/user3-128x128.jpg" class="img-circle" alt="User Image">
													</div>
													<h4>销售部<small><i class="fa fa-clock-o"></i> 昨天</small></h4>
													<p>为什么不买一个新的可怕的主题？</p>
												</a>
											</li>
											<li>
												<a href="javascript:void(0);">
													<div class="pull-left">
														<img src="/static/dist/img/user4-128x128.jpg" class="img-circle" alt="User Image">
													</div>
													<h4>审稿人<small><i class="fa fa-clock-o"></i> 2天</small></h4>
													<p>为什么不买一个新的可怕的主题？</p>
												</a>
											</li>
										</ul>
									</li>
									<li class="footer">
										<a href="javascript:void(0);">查看所有的消息</a>
									</li>
								</ul>
							</li>
							<!-- Notifications: style can be found in dropdown.less -->
							<li class="dropdown notifications-menu">
								<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown">
									<i class="fa fa-bell-o"></i>
									<span class="label label-warning">10</span>
								</a>
								<ul class="dropdown-menu">
									<li class="header">您有10个通知</li>
									<li>
										<!-- inner menu: contains the actual data -->
										<ul class="menu">
											<li>
												<a href="javascript:void(0);"><i class="fa fa-users text-aqua"></i> 今天有5名新成员加入。</a>
											</li>
											<li>
												<a href="javascript:void(0);"><i class="fa fa-warning text-yellow"></i> 很长的描述，这里可能不适合页面，可能会导致设计问题</a>
											</li>
											<li>
												<a href="javascript:void(0);"><i class="fa fa-users text-red"></i> 5个新成员加入</a>
											</li>

											<li>
												<a href="javascript:void(0);"><i class="fa fa-shopping-cart text-green"></i> 25销售</a>
											</li>
											<li>
												<a href="javascript:void(0);"><i class="fa fa-user text-red"></i> 你改变了你的用户名</a>
											</li>
										</ul>
									</li>
									<li class="footer">
										<a href="javascript:void(0);">查看所有</a>
									</li>
								</ul>
							</li>
							<!-- Tasks: style can be found in dropdown.less -->
							<li class="dropdown tasks-menu">
								<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown">
									<i class="fa fa-flag-o"></i>
									<span class="label label-danger">9</span>
								</a>
								<ul class="dropdown-menu">
									<li class="header">你有9个任务</li>
									<li>
										<!-- inner menu: contains the actual data -->
										<ul class="menu">
											<li>
												<!-- Task item -->
												<a href="javascript:void(0);">
													<h3>设计一些按钮<small class="pull-right">20%</small></h3>
													<div class="progress xs">
														<div class="progress-bar progress-bar-aqua" style="width: 20%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
															<span class="sr-only">完成 20%</span>
														</div>
													</div>
												</a>
											</li>
											<!-- end task item -->
											<li>
												<!-- Task item -->
												<a href="javascript:void(0);">
													<h3>创建一个好的主题<small class="pull-right">40%</small></h3>
													<div class="progress xs">
														<div class="progress-bar progress-bar-green" style="width: 40%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
															<span class="sr-only">完成 40%</span>
														</div>
													</div>
												</a>
											</li>
											<!-- end task item -->
											<li>
												<!-- Task item -->
												<a href="javascript:void(0);">
													<h3>我需要做的一些任务<small class="pull-right">60%</small></h3>
													<div class="progress xs">
														<div class="progress-bar progress-bar-red" style="width: 60%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
															<span class="sr-only">完成 60%</span>
														</div>
													</div>
												</a>
											</li>
											<!-- end task item -->
											<li>
												<!-- Task item -->
												<a href="javascript:void(0);">
													<h3> 完美转变<small class="pull-right">80%</small></h3>
													<div class="progress xs">
														<div class="progress-bar progress-bar-yellow" style="width: 80%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
															<span class="sr-only">完成 80% </span>
														</div>
													</div>
												</a>
											</li>
											<!-- end task item -->
										</ul>
									</li>
									<li class="footer">
										<a href="javascript:void(0);">查看所有任务</a>
									</li>
								</ul>
							</li>
							<!-- User Account: style can be found in dropdown.less -->
							<li class="dropdown user user-menu">
								<a href="#" class="dropdown-toggle" data-toggle="dropdown">
									<img src="" class="user-image Img" alt="User Image">
									<span class="hidden-xs username"></span>
								</a>
								<ul class="dropdown-menu">
									<!-- User image -->
									<li class="user-header">
										<img src="" class="img-circle Img" alt="User Image">
										<p class="username"></p>
										<p class="role"></p>
									</li>

									<!-- Menu Footer-->
									<li class="user-footer" style="background-color: gainsboro;">

										<div class="pull-right">
											<a href="/logout" class="btn btn-flat">退出登陆</a>
										</div>
									</li>
								</ul>
							</li>
						</ul>
					</div>
				</nav>
			</header>
			<!-- Left side column. contains the logo and sidebar -->
			<aside class="main-sidebar">
				<!-- sidebar: style can be found in sidebar.less -->
				<section class="sidebar">
					<div class="user-panel">
						<div class="pull-left image">
							<img src="" class="img-circle Img" alt="User Image">
						</div>
						<div class="pull-left info">
							<p class="username"></p>
							<a href="/logout" title="点击退出当前账号"><i class="fa fa-circle text-success"></i> <b class="status"></b></a>
						</div>
					</div>
					<!-- sidebar menu: : style can be found in sidebar.less -->
					<ul class="sidebar-menu" data-widget="tree" id="menu">
						<li class="header">主导航</li>

					</ul>
				</section>
				<!-- /.sidebar -->
			</aside>

			<!-- Content Wrapper. Contains page content -->
			<div class="content-wrapper">
				<!-- Content Header (Page header) -->
				<section class="content-header">
					<h1>首页</h1>
					<ol class="breadcrumb">
						<li>
							<a href="javascript:void(0);"><i class="fa fa-dashboard"></i> 首页</a>
						</li>
					</ol>

				</section>
				<section class="content">
					<h2>欢迎<span class="username"></span>进入</h2>
					<h1>用户权限管理系统</h1>
					<h3>您现在的角色是 【 <span class="role"></span> 】 </h3>
				</section>
			</div>
			<!-- /.content-wrapper -->
			<footer class="main-footer">
				<div class="pull-right hidden-xs">
					<b>Version</b> 2.4.0
				</div>
				<strong>Copyright &copy; 2014-2016 <a href="https://adminlte.io">Almsaeed Studio</a>.</strong> All rights reserved.
			</footer>

			<!-- Control Sidebar -->
			<aside class="control-sidebar control-sidebar-dark">
				<!-- Create the tabs -->
				<ul class="nav nav-tabs nav-justified control-sidebar-tabs">
					<li>
						<a href="javascript:void(0);control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a>
					</li>
					<li>
						<a href="javascript:void(0);control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a>
					</li>
				</ul>
				<!-- Tab panes -->
				<div class="tab-content">
					<!-- Home tab content -->
					<div class="tab-pane" id="control-sidebar-home-tab">
						<h3 class="control-sidebar-heading">最近的活动 </h3>
						<ul class="control-sidebar-menu">
							<li>
								<a href="javascript:void(0)">
									<i class="menu-icon fa fa-birthday-cake bg-red"></i>

									<div class="menu-info">
										<h4 class="control-sidebar-subheading">兰登的生日</h4>

										<p>Will be 23 on April 24th</p>
									</div>
								</a>
							</li>
							<li>
								<a href="javascript:void(0)">
									<i class="menu-icon fa fa-user bg-yellow"></i>

									<div class="menu-info">
										<h4 class="control-sidebar-subheading">Frodo更新他的资料 </h4>

										<p>新电话+ 1（800）555-1234 </p>
									</div>
								</a>
							</li>
							<li>
								<a href="javascript:void(0)">
									<i class="menu-icon fa fa-envelope-o bg-light-blue"></i>

									<div class="menu-info">
										<h4 class="control-sidebar-subheading">Nora加入邮件列表 </h4>

										<p>nora@example.com</p>
									</div>
								</a>
							</li>
							<li>
								<a href="javascript:void(0)">
									<i class="menu-icon fa fa-file-code-o bg-green"></i>

									<div class="menu-info">
										<h4 class="control-sidebar-subheading">作业254执行</h4>

										<p>执行时间5秒</p>
									</div>
								</a>
							</li>
						</ul>
						<!-- /.control-sidebar-menu -->

						<h3 class="control-sidebar-heading">任务进度</h3>
						<ul class="control-sidebar-menu">
							<li>
								<a href="javascript:void(0)">
									<h4 class="control-sidebar-subheading">
                自定义模板的设计
                <span class="label label-danger pull-right">70%</span>
              </h4>

									<div class="progress progress-xxs">
										<div class="progress-bar progress-bar-danger" style="width: 70%"></div>
									</div>
								</a>
							</li>
							<li>
								<a href="javascript:void(0)">
									<h4 class="control-sidebar-subheading">
                更新简历
                <span class="label label-success pull-right">95%</span>
              </h4>

									<div class="progress progress-xxs">
										<div class="progress-bar progress-bar-success" style="width: 95%"></div>
									</div>
								</a>
							</li>
							<li>
								<a href="javascript:void(0)">
									<h4 class="control-sidebar-subheading">
                Laravel积分
                <span class="label label-warning pull-right">50%</span>
              </h4>

									<div class="progress progress-xxs">
										<div class="progress-bar progress-bar-warning" style="width: 50%"></div>
									</div>
								</a>
							</li>
							<li>
								<a href="javascript:void(0)">
									<h4 class="control-sidebar-subheading">
                后端框架
                <span class="label label-primary pull-right">68%</span>
              </h4>

									<div class="progress progress-xxs">
										<div class="progress-bar progress-bar-primary" style="width: 68%"></div>
									</div>
								</a>
							</li>
						</ul>
						<!-- /.control-sidebar-menu -->

					</div>
					<!-- /.tab-pane -->
					<!-- Stats tab content -->
					<div class="tab-pane" id="control-sidebar-stats-tab">统计表的内容</div>
					<!-- /.tab-pane -->
					<!-- Settings tab content -->
					<div class="tab-pane" id="control-sidebar-settings-tab">
						<form method="post">
							<h3 class="control-sidebar-heading">一般设置</h3>

							<div class="form-group">
								<label class="control-sidebar-subheading">
              面板的使用报告
              <input type="checkbox" class="pull-right" checked>
            </label>

								<p>
									有关此一般设置选项的一些信息
								</p>
							</div>
							<!-- /.form-group -->

							<div class="form-group">
								<label class="control-sidebar-subheading">
									允许邮件重定向
              <input type="checkbox" class="pull-right" checked>
            </label>

								<p>
									其他选项集可用
								</p>
							</div>
							<!-- /.form-group -->

							<div class="form-group">
								<label class="control-sidebar-subheading">
              在帖子中显示作者姓名
              <input type="checkbox" class="pull-right" checked>
            </label>

								<p>
									允许用户在博客帖子中显示自己的名字
								</p>
							</div>
							<!-- /.form-group -->

							<h3 class="control-sidebar-heading">聊天设置</h3>

							<div class="form-group">
								<label class="control-sidebar-subheading">
              在线显示我
              <input type="checkbox" class="pull-right" checked>
            </label>
							</div>
							<!-- /.form-group -->

							<div class="form-group">
								<label class="control-sidebar-subheading">
             关闭通知
              <input type="checkbox" class="pull-right">
            </label>
							</div>
							<!-- /.form-group -->

							<div class="form-group">
								<label class="control-sidebar-subheading">
              删除的聊天记录
              <a href="javascript:void(0)" class="text-red pull-right"><i class="fa fa-trash-o"></i></a>
            </label>
							</div>
							<!-- /.form-group -->
						</form>
					</div>
					<!-- /.tab-pane -->
				</div>
			</aside>
			<!-- /.control-sidebar -->
			<!-- Add the sidebar's background. This div must be placed
       immediately after the control sidebar -->
			<div class="control-sidebar-bg"></div>
		</div>
		<!-- ./wrapper -->

		<!-- jQuery 3 -->
		<script src="/static/bower_components/jquery/dist/jquery.min.js"></script>
		<!-- Bootstrap 3.3.7 -->
		<script src="/static/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
		<!-- DataTables -->
		<script src="/static/bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
		<script src="/static/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
		<!-- SlimScroll -->
		<script src="/static/bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></script>
		<!-- FastClick -->
		<script src="/static/bower_components/fastclick/lib/fastclick.js"></script>
		<!-- AdminLTE App -->
		<script src="/static/dist/js/adminlte.min.js"></script>
		<!-- AdminLTE for demo purposes -->
		<script src="/static/dist/js/demo.js"></script>
		<script src="/static/common/js/base-modal.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(function() {

				var count = sessionStorage.getItem('MenuCount');
				console.log(count);
				var s1 = '<li class="treeview"><a href="javascript:void(0);"><i class="fa fa-dashboard"></i> <span>角色授权</span><span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span></a>' +
					'<ul class="treeview-menu"><li><a href="/role/list"><i class="fa fa-circle-o"></i>角色管理</a></li><li><a href="/power/list"><i class="fa fa-circle-o"></i>授权管理</a></li></ul></li>';

				var s2 = '<li class="treeview"><a href="javascript:void(0);"><i class="fa fa-dashboard"></i> <span>用户管理</span><span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span></a><ul class="treeview-menu">' +
					'<li><a href="/user/show"><i class="fa fa-circle-o"></i>个人信息</a></li></li>';
				var s3 = '<li class="treeview"><a href="javascript:void(0);"><i class="fa fa-dashboard"></i> <span>用户管理</span><span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span></a><ul class="treeview-menu">' +
					'<li><a href="/user/show"><i class="fa fa-circle-o"></i>个人信息</a></li><li id="userList"><a href="/user/list"><i class="fa fa-circle-o"></i>用户信息</a></li></ul></li>';
				if(count == 4) {
					$("#menu").append(s3);
					$("#menu").append(s1);
					$('.role').html('超级管理员');
				} else if(count == 2) {
					$("#menu").append(s3);
					$('.role').html('普通管理员');
				} else if(count == 1) {
					$("#menu").append(s2);
					$('.role').html('普通用户');

				}
				var name = sessionStorage.getItem('user');
				if(name != "") {
					$(".username").html(name);
					$(".status").html("在线");
					$.ajax({
						type: "get",
						url: "/user/self",
						data: {
							username: name
						},
						success: function(data) {

							var data = JSON.parse(data);

							var img = data[0]['Image'];
							sessionStorage.setItem("img", img);
							var Img = sessionStorage.getItem("img");
							$(".Img").attr("src", '/static/img/' + Img);
							$("#headImg").attr("src", '/static/img/' + Img);
						},
						error: function(er) {
							console.log(er);
						}
					});

				}

			});
		</script>
	</body>

</html>